<?php

namespace Home\Controller; //当前命名空间跟文件目录一样
use Think\Controller;

class IndexController extends Controller
{
	public function index()
	{
		$version_arr = explode(' ', $_SERVER['SERVER_SOFTWARE']);
		$serverInfo['apache_version'] = $version_arr[0];
		//获取PHP当前版本信息
		$serverInfo['php_version'] = PHP_VERSION;
		//获取系统当前时间
		$serverInfo['server_time'] = date('Y-m-d H:i:s', time());
		$this->assign('serverInfo', $serverInfo);
		$this->display();
	}
}
